-- GENERATED SPELL FOR [Razorfen Beastmaster] --


function spell0_4532(pUnit, Event) --@Poisoned Shot,n/a--
pUnit:FullCastSpellOnTarget(8275,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4532', 2000, 1)
end

function spell1_4532(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4532', 637, 1)
end

function spell2_4532(pUnit, Event) --@Summon Tamed Hyena,Self--
pUnit:FullCastSpellOnTarget(8276,pUnit)
pUnit:RegisterEvent('Sorts_4532', 632, 1)
end

function Sorts_4532(pUnit, Event)
local choix_sorts_4532 = math.random(0, 2)
if choix_sorts_4532 == 0 then
pUnit:RegisterEvent('spell0_4532', 1, 1)
end
if choix_sorts_4532 == 1 then
pUnit:RegisterEvent('spell1_4532', 1, 1)
end
if choix_sorts_4532 == 2 then
pUnit:RegisterEvent('spell2_4532', 1, 1)
end
end

function mob4532_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4532', math.random(1500, 3000), 1)
end

function mob4532_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4532_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4532_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4532, 1, 'mob4532_Action')
RegisterUnitEvent(4532, 2, 'mob4532_Leave')
RegisterUnitEvent(4532, 3, 'mob4532_Kill')
RegisterUnitEvent(4532, 4, 'mob4532_Die')
